<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>LCOV - id:000977,sync:fuzzer2,src:001052.lcov_info_final - test/integration/node_spec_test.cpp</title>
  <link rel="stylesheet" type="text/css" href="../../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LCOV - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
          <tr>
            <td width="10%" class="headerItem">Current view:</td>
            <td width="35%" class="headerValue"><a href="../../index.html">top level</a> - <a href="index.html">test/integration</a> - node_spec_test.cpp<span style="font-size: 80%;"> (source / <a href="node_spec_test.cpp.func-sort-c.html">functions</a>)</span></td>
            <td width="5%"></td>
            <td width="15%"></td>
            <td width="10%" class="headerCovTableHead">Hit</td>
            <td width="10%" class="headerCovTableHead">Total</td>
            <td width="15%" class="headerCovTableHead">Coverage</td>
          </tr>
          <tr>
            <td class="headerItem">Test:</td>
            <td class="headerValue">id:000977,sync:fuzzer2,src:001052.lcov_info_final</td>
            <td></td>
            <td class="headerItem">Lines:</td>
            <td class="headerCovTableEntry">0</td>
            <td class="headerCovTableEntry">910</td>
            <td class="headerCovTableEntryLo">0.0 %</td>
          </tr>
          <tr>
            <td class="headerItem">Date:</td>
            <td class="headerValue">2016-03-13 10:42:47</td>
            <td></td>
            <td class="headerItem">Functions:</td>
            <td class="headerCovTableEntry">0</td>
            <td class="headerCovTableEntry">450</td>
            <td class="headerCovTableEntryLo">0.0 %</td>
          </tr>
          <tr><td><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
        </table>
      </td>
    </tr>

    <tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td>
<pre class="sourceHeading">          Line data    Source code</pre>
<pre class="source">
<a name="1"><span class="lineNum">       1 </span>            : #include &quot;specexamples.h&quot;</a>
<span class="lineNum">       2 </span>            : #include &quot;yaml-cpp/yaml.h&quot;  // IWYU pragma: keep
<span class="lineNum">       3 </span>            : 
<span class="lineNum">       4 </span>            : #include &quot;gtest/gtest.h&quot;
<span class="lineNum">       5 </span>            : 
<span class="lineNum">       6 </span>            : #define EXPECT_THROW_PARSER_EXCEPTION(statement, message) \
<span class="lineNum">       7 </span>            :   ASSERT_THROW(statement, ParserException);               \
<span class="lineNum">       8 </span>            :   try {                                                   \
<span class="lineNum">       9 </span>            :     statement;                                            \
<span class="lineNum">      10 </span>            :   } catch (const ParserException&amp; e) {                    \
<span class="lineNum">      11 </span>            :     EXPECT_EQ(e.msg, message);                            \
<span class="lineNum">      12 </span>            :   }
<span class="lineNum">      13 </span>            : 
<span class="lineNum">      14 </span>            : namespace YAML {
<a name="15"><span class="lineNum">      15 </span>            : namespace {</a>
<span class="lineNum">      16 </span>            : 
<span class="lineNum">      17 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex2_1_SeqScalars) {</span>
<span class="lineNum">      18 </span><span class="lineNoCov">          0 :   Node doc = Load(ex2_1);</span>
<span class="lineNum">      19 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc.IsSequence());</span>
<span class="lineNum">      20 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc.size());</span>
<span class="lineNum">      21 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Mark McGwire&quot;, doc[0].as&lt;std::string&gt;());</span>
<span class="lineNum">      22 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Sammy Sosa&quot;, doc[1].as&lt;std::string&gt;());</span>
<span class="lineNum">      23 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Ken Griffey&quot;, doc[2].as&lt;std::string&gt;());</span>
<a name="24"><span class="lineNum">      24 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">      25 </span>            : 
<span class="lineNum">      26 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex2_2_MappingScalarsToScalars) {</span>
<span class="lineNum">      27 </span><span class="lineNoCov">          0 :   Node doc = Load(ex2_2);</span>
<span class="lineNum">      28 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc.IsMap());</span>
<span class="lineNum">      29 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc.size());</span>
<span class="lineNum">      30 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;65&quot;, doc[&quot;hr&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">      31 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;0.278&quot;, doc[&quot;avg&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">      32 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;147&quot;, doc[&quot;rbi&quot;].as&lt;std::string&gt;());</span>
<a name="33"><span class="lineNum">      33 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">      34 </span>            : 
<span class="lineNum">      35 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex2_3_MappingScalarsToSequences) {</span>
<span class="lineNum">      36 </span><span class="lineNoCov">          0 :   Node doc = Load(ex2_3);</span>
<span class="lineNum">      37 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc.IsMap());</span>
<span class="lineNum">      38 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc.size());</span>
<span class="lineNum">      39 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc[&quot;american&quot;].size());</span>
<span class="lineNum">      40 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Boston Red Sox&quot;, doc[&quot;american&quot;][0].as&lt;std::string&gt;());</span>
<span class="lineNum">      41 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Detroit Tigers&quot;, doc[&quot;american&quot;][1].as&lt;std::string&gt;());</span>
<span class="lineNum">      42 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;New York Yankees&quot;, doc[&quot;american&quot;][2].as&lt;std::string&gt;());</span>
<span class="lineNum">      43 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc[&quot;national&quot;].size());</span>
<span class="lineNum">      44 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;New York Mets&quot;, doc[&quot;national&quot;][0].as&lt;std::string&gt;());</span>
<span class="lineNum">      45 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Chicago Cubs&quot;, doc[&quot;national&quot;][1].as&lt;std::string&gt;());</span>
<span class="lineNum">      46 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Atlanta Braves&quot;, doc[&quot;national&quot;][2].as&lt;std::string&gt;());</span>
<a name="47"><span class="lineNum">      47 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">      48 </span>            : 
<span class="lineNum">      49 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex2_4_SequenceOfMappings) {</span>
<span class="lineNum">      50 </span><span class="lineNoCov">          0 :   Node doc = Load(ex2_4);</span>
<span class="lineNum">      51 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc.size());</span>
<span class="lineNum">      52 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc[0].size());</span>
<span class="lineNum">      53 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Mark McGwire&quot;, doc[0][&quot;name&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">      54 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;65&quot;, doc[0][&quot;hr&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">      55 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;0.278&quot;, doc[0][&quot;avg&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">      56 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc[1].size());</span>
<span class="lineNum">      57 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Sammy Sosa&quot;, doc[1][&quot;name&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">      58 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;63&quot;, doc[1][&quot;hr&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">      59 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;0.288&quot;, doc[1][&quot;avg&quot;].as&lt;std::string&gt;());</span>
<a name="60"><span class="lineNum">      60 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">      61 </span>            : 
<span class="lineNum">      62 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex2_5_SequenceOfSequences) {</span>
<span class="lineNum">      63 </span><span class="lineNoCov">          0 :   Node doc = Load(ex2_5);</span>
<span class="lineNum">      64 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc.size());</span>
<span class="lineNum">      65 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc[0].size());</span>
<span class="lineNum">      66 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;name&quot;, doc[0][0].as&lt;std::string&gt;());</span>
<span class="lineNum">      67 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;hr&quot;, doc[0][1].as&lt;std::string&gt;());</span>
<span class="lineNum">      68 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;avg&quot;, doc[0][2].as&lt;std::string&gt;());</span>
<span class="lineNum">      69 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc[1].size());</span>
<span class="lineNum">      70 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Mark McGwire&quot;, doc[1][0].as&lt;std::string&gt;());</span>
<span class="lineNum">      71 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;65&quot;, doc[1][1].as&lt;std::string&gt;());</span>
<span class="lineNum">      72 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;0.278&quot;, doc[1][2].as&lt;std::string&gt;());</span>
<span class="lineNum">      73 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc[2].size());</span>
<span class="lineNum">      74 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Sammy Sosa&quot;, doc[2][0].as&lt;std::string&gt;());</span>
<span class="lineNum">      75 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;63&quot;, doc[2][1].as&lt;std::string&gt;());</span>
<span class="lineNum">      76 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;0.288&quot;, doc[2][2].as&lt;std::string&gt;());</span>
<a name="77"><span class="lineNum">      77 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">      78 </span>            : 
<span class="lineNum">      79 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex2_6_MappingOfMappings) {</span>
<span class="lineNum">      80 </span><span class="lineNoCov">          0 :   Node doc = Load(ex2_6);</span>
<span class="lineNum">      81 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc.size());</span>
<span class="lineNum">      82 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[&quot;Mark McGwire&quot;].size());</span>
<span class="lineNum">      83 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;65&quot;, doc[&quot;Mark McGwire&quot;][&quot;hr&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">      84 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;0.278&quot;, doc[&quot;Mark McGwire&quot;][&quot;avg&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">      85 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[&quot;Sammy Sosa&quot;].size());</span>
<span class="lineNum">      86 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;63&quot;, doc[&quot;Sammy Sosa&quot;][&quot;hr&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">      87 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;0.288&quot;, doc[&quot;Sammy Sosa&quot;][&quot;avg&quot;].as&lt;std::string&gt;());</span>
<a name="88"><span class="lineNum">      88 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">      89 </span>            : 
<span class="lineNum">      90 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex2_7_TwoDocumentsInAStream) {</span>
<span class="lineNum">      91 </span><span class="lineNoCov">          0 :   std::vector&lt;Node&gt; docs = LoadAll(ex2_7);</span>
<span class="lineNum">      92 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, docs.size());</span>
<span class="lineNum">      93 </span>            : 
<span class="lineNum">      94 </span>            :   {
<span class="lineNum">      95 </span><span class="lineNoCov">          0 :     Node doc = docs[0];</span>
<span class="lineNum">      96 </span><span class="lineNoCov">          0 :     EXPECT_EQ(3, doc.size());</span>
<span class="lineNum">      97 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;Mark McGwire&quot;, doc[0].as&lt;std::string&gt;());</span>
<span class="lineNum">      98 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;Sammy Sosa&quot;, doc[1].as&lt;std::string&gt;());</span>
<span class="lineNum">      99 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;Ken Griffey&quot;, doc[2].as&lt;std::string&gt;());</span>
<span class="lineNum">     100 </span>            :   }
<span class="lineNum">     101 </span>            : 
<span class="lineNum">     102 </span>            :   {
<span class="lineNum">     103 </span><span class="lineNoCov">          0 :     Node doc = docs[1];</span>
<span class="lineNum">     104 </span><span class="lineNoCov">          0 :     EXPECT_EQ(2, doc.size());</span>
<span class="lineNum">     105 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;Chicago Cubs&quot;, doc[0].as&lt;std::string&gt;());</span>
<span class="lineNum">     106 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;St Louis Cardinals&quot;, doc[1].as&lt;std::string&gt;());</span>
<span class="lineNum">     107 </span>            :   }
<a name="108"><span class="lineNum">     108 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     109 </span>            : 
<span class="lineNum">     110 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex2_8_PlayByPlayFeed) {</span>
<span class="lineNum">     111 </span><span class="lineNoCov">          0 :   std::vector&lt;Node&gt; docs = LoadAll(ex2_8);</span>
<span class="lineNum">     112 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, docs.size());</span>
<span class="lineNum">     113 </span>            : 
<span class="lineNum">     114 </span>            :   {
<span class="lineNum">     115 </span><span class="lineNoCov">          0 :     Node doc = docs[0];</span>
<span class="lineNum">     116 </span><span class="lineNoCov">          0 :     EXPECT_EQ(3, doc.size());</span>
<span class="lineNum">     117 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;20:03:20&quot;, doc[&quot;time&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     118 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;Sammy Sosa&quot;, doc[&quot;player&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     119 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;strike (miss)&quot;, doc[&quot;action&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     120 </span>            :   }
<span class="lineNum">     121 </span>            : 
<span class="lineNum">     122 </span>            :   {
<span class="lineNum">     123 </span><span class="lineNoCov">          0 :     Node doc = docs[1];</span>
<span class="lineNum">     124 </span><span class="lineNoCov">          0 :     EXPECT_EQ(3, doc.size());</span>
<span class="lineNum">     125 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;20:03:47&quot;, doc[&quot;time&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     126 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;Sammy Sosa&quot;, doc[&quot;player&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     127 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;grand slam&quot;, doc[&quot;action&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     128 </span>            :   }
<a name="129"><span class="lineNum">     129 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     130 </span>            : 
<span class="lineNum">     131 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex2_9_SingleDocumentWithTwoComments) {</span>
<span class="lineNum">     132 </span><span class="lineNoCov">          0 :   Node doc = Load(ex2_9);</span>
<span class="lineNum">     133 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc.size());</span>
<span class="lineNum">     134 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[&quot;hr&quot;].size());</span>
<span class="lineNum">     135 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Mark McGwire&quot;, doc[&quot;hr&quot;][0].as&lt;std::string&gt;());</span>
<span class="lineNum">     136 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Sammy Sosa&quot;, doc[&quot;hr&quot;][1].as&lt;std::string&gt;());</span>
<span class="lineNum">     137 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[&quot;rbi&quot;].size());</span>
<span class="lineNum">     138 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Sammy Sosa&quot;, doc[&quot;rbi&quot;][0].as&lt;std::string&gt;());</span>
<span class="lineNum">     139 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Ken Griffey&quot;, doc[&quot;rbi&quot;][1].as&lt;std::string&gt;());</span>
<a name="140"><span class="lineNum">     140 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     141 </span>            : 
<span class="lineNum">     142 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex2_10_SimpleAnchor) {</span>
<span class="lineNum">     143 </span><span class="lineNoCov">          0 :   Node doc = Load(ex2_10);</span>
<span class="lineNum">     144 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc.size());</span>
<span class="lineNum">     145 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[&quot;hr&quot;].size());</span>
<span class="lineNum">     146 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Mark McGwire&quot;, doc[&quot;hr&quot;][0].as&lt;std::string&gt;());</span>
<span class="lineNum">     147 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Sammy Sosa&quot;, doc[&quot;hr&quot;][1].as&lt;std::string&gt;());</span>
<span class="lineNum">     148 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[&quot;rbi&quot;].size());</span>
<span class="lineNum">     149 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Sammy Sosa&quot;, doc[&quot;rbi&quot;][0].as&lt;std::string&gt;());</span>
<span class="lineNum">     150 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Ken Griffey&quot;, doc[&quot;rbi&quot;][1].as&lt;std::string&gt;());</span>
<a name="151"><span class="lineNum">     151 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     152 </span>            : 
<span class="lineNum">     153 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex2_11_MappingBetweenSequences) {</span>
<span class="lineNum">     154 </span><span class="lineNoCov">          0 :   Node doc = Load(ex2_11);</span>
<span class="lineNum">     155 </span>            : 
<span class="lineNum">     156 </span><span class="lineNoCov">          0 :   std::vector&lt;std::string&gt; tigers_cubs;</span>
<span class="lineNum">     157 </span><span class="lineNoCov">          0 :   tigers_cubs.push_back(&quot;Detroit Tigers&quot;);</span>
<span class="lineNum">     158 </span><span class="lineNoCov">          0 :   tigers_cubs.push_back(&quot;Chicago cubs&quot;);</span>
<span class="lineNum">     159 </span>            : 
<span class="lineNum">     160 </span><span class="lineNoCov">          0 :   std::vector&lt;std::string&gt; yankees_braves;</span>
<span class="lineNum">     161 </span><span class="lineNoCov">          0 :   yankees_braves.push_back(&quot;New York Yankees&quot;);</span>
<span class="lineNum">     162 </span><span class="lineNoCov">          0 :   yankees_braves.push_back(&quot;Atlanta Braves&quot;);</span>
<span class="lineNum">     163 </span>            : 
<span class="lineNum">     164 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc.size());</span>
<span class="lineNum">     165 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[tigers_cubs].size());</span>
<span class="lineNum">     166 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;2001-07-23&quot;, doc[tigers_cubs][0].as&lt;std::string&gt;());</span>
<span class="lineNum">     167 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc[yankees_braves].size());</span>
<span class="lineNum">     168 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;2001-07-02&quot;, doc[yankees_braves][0].as&lt;std::string&gt;());</span>
<span class="lineNum">     169 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;2001-08-12&quot;, doc[yankees_braves][1].as&lt;std::string&gt;());</span>
<span class="lineNum">     170 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;2001-08-14&quot;, doc[yankees_braves][2].as&lt;std::string&gt;());</span>
<a name="171"><span class="lineNum">     171 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     172 </span>            : 
<span class="lineNum">     173 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex2_12_CompactNestedMapping) {</span>
<span class="lineNum">     174 </span><span class="lineNoCov">          0 :   Node doc = Load(ex2_12);</span>
<span class="lineNum">     175 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc.size());</span>
<span class="lineNum">     176 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[0].size());</span>
<span class="lineNum">     177 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Super Hoop&quot;, doc[0][&quot;item&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     178 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[0][&quot;quantity&quot;].as&lt;int&gt;());</span>
<span class="lineNum">     179 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[1].size());</span>
<span class="lineNum">     180 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Basketball&quot;, doc[1][&quot;item&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     181 </span><span class="lineNoCov">          0 :   EXPECT_EQ(4, doc[1][&quot;quantity&quot;].as&lt;int&gt;());</span>
<span class="lineNum">     182 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[2].size());</span>
<span class="lineNum">     183 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Big Shoes&quot;, doc[2][&quot;item&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     184 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[2][&quot;quantity&quot;].as&lt;int&gt;());</span>
<a name="185"><span class="lineNum">     185 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     186 </span>            : 
<span class="lineNum">     187 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex2_13_InLiteralsNewlinesArePreserved) {</span>
<span class="lineNum">     188 </span><span class="lineNoCov">          0 :   Node doc = Load(ex2_13);</span>
<span class="lineNum">     189 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc.as&lt;std::string&gt;() ==</span>
<span class="lineNum">     190 </span>            :               &quot;\\//||\\/||\n&quot;
<span class="lineNum">     191 </span><span class="lineNoCov">          0 :               &quot;// ||  ||__&quot;);</span>
<a name="192"><span class="lineNum">     192 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     193 </span>            : 
<span class="lineNum">     194 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex2_14_InFoldedScalarsNewlinesBecomeSpaces) {</span>
<span class="lineNum">     195 </span><span class="lineNoCov">          0 :   Node doc = Load(ex2_14);</span>
<span class="lineNum">     196 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc.as&lt;std::string&gt;() ==</span>
<span class="lineNum">     197 </span><span class="lineNoCov">          0 :               &quot;Mark McGwire's year was crippled by a knee injury.&quot;);</span>
<a name="198"><span class="lineNum">     198 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     199 </span>            : 
<span class="lineNum">     200 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest,</span>
<span class="lineNum">     201 </span>            :      Ex2_15_FoldedNewlinesArePreservedForMoreIndentedAndBlankLines) {
<span class="lineNum">     202 </span><span class="lineNoCov">          0 :   Node doc = Load(ex2_15);</span>
<span class="lineNum">     203 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc.as&lt;std::string&gt;() ==</span>
<span class="lineNum">     204 </span>            :               &quot;Sammy Sosa completed another fine season with great stats.\n\n&quot;
<span class="lineNum">     205 </span>            :               &quot;  63 Home Runs\n&quot;
<span class="lineNum">     206 </span>            :               &quot;  0.288 Batting Average\n\n&quot;
<span class="lineNum">     207 </span><span class="lineNoCov">          0 :               &quot;What a year!&quot;);</span>
<a name="208"><span class="lineNum">     208 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     209 </span>            : 
<span class="lineNum">     210 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex2_16_IndentationDeterminesScope) {</span>
<span class="lineNum">     211 </span><span class="lineNoCov">          0 :   Node doc = Load(ex2_16);</span>
<span class="lineNum">     212 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc.size());</span>
<span class="lineNum">     213 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Mark McGwire&quot;, doc[&quot;name&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     214 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[&quot;accomplishment&quot;].as&lt;std::string&gt;() ==</span>
<span class="lineNum">     215 </span><span class="lineNoCov">          0 :               &quot;Mark set a major league home run record in 1998.\n&quot;);</span>
<span class="lineNum">     216 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[&quot;stats&quot;].as&lt;std::string&gt;() ==</span>
<span class="lineNum">     217 </span><span class="lineNoCov">          0 :               &quot;65 Home Runs\n0.278 Batting Average\n&quot;);</span>
<a name="218"><span class="lineNum">     218 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     219 </span>            : 
<span class="lineNum">     220 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex2_17_QuotedScalars) {</span>
<span class="lineNum">     221 </span><span class="lineNoCov">          0 :   Node doc = Load(ex2_17);</span>
<span class="lineNum">     222 </span><span class="lineNoCov">          0 :   EXPECT_EQ(6, doc.size());</span>
<span class="lineNum">     223 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Sosa did fine.\xe2\x98\xba&quot;, doc[&quot;unicode&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     224 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;\b1998\t1999\t2000\n&quot;, doc[&quot;control&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     225 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;\x0d\x0a is \r\n&quot;, doc[&quot;hex esc&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     226 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;\&quot;Howdy!\&quot; he cried.&quot;, doc[&quot;single&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     227 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot; # Not a 'comment'.&quot;, doc[&quot;quoted&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     228 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;|\\-*-/|&quot;, doc[&quot;tie-fighter&quot;].as&lt;std::string&gt;());</span>
<a name="229"><span class="lineNum">     229 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     230 </span>            : 
<span class="lineNum">     231 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex2_18_MultiLineFlowScalars) {</span>
<span class="lineNum">     232 </span><span class="lineNoCov">          0 :   Node doc = Load(ex2_18);</span>
<span class="lineNum">     233 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc.size());</span>
<span class="lineNum">     234 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[&quot;plain&quot;].as&lt;std::string&gt;() ==</span>
<span class="lineNum">     235 </span><span class="lineNoCov">          0 :               &quot;This unquoted scalar spans many lines.&quot;);</span>
<span class="lineNum">     236 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[&quot;quoted&quot;].as&lt;std::string&gt;() ==</span>
<span class="lineNum">     237 </span><span class="lineNoCov">          0 :               &quot;So does this quoted scalar.\n&quot;);</span>
<span class="lineNum">     238 </span><span class="lineNoCov">          0 : }</span>
<span class="lineNum">     239 </span>            : 
<a name="240"><span class="lineNum">     240 </span>            : // TODO: 2.19 - 2.22 schema tags</a>
<span class="lineNum">     241 </span>            : 
<span class="lineNum">     242 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex2_23_VariousExplicitTags) {</span>
<span class="lineNum">     243 </span><span class="lineNoCov">          0 :   Node doc = Load(ex2_23);</span>
<span class="lineNum">     244 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc.size());</span>
<span class="lineNum">     245 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;tag:yaml.org,2002:str&quot;, doc[&quot;not-date&quot;].Tag());</span>
<span class="lineNum">     246 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;2002-04-28&quot;, doc[&quot;not-date&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     247 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;tag:yaml.org,2002:binary&quot;, doc[&quot;picture&quot;].Tag());</span>
<span class="lineNum">     248 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[&quot;picture&quot;].as&lt;std::string&gt;() ==</span>
<span class="lineNum">     249 </span>            :               &quot;R0lGODlhDAAMAIQAAP//9/X\n&quot;
<span class="lineNum">     250 </span>            :               &quot;17unp5WZmZgAAAOfn515eXv\n&quot;
<span class="lineNum">     251 </span>            :               &quot;Pz7Y6OjuDg4J+fn5OTk6enp\n&quot;
<span class="lineNum">     252 </span><span class="lineNoCov">          0 :               &quot;56enmleECcgggoBADs=\n&quot;);</span>
<span class="lineNum">     253 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;!something&quot;, doc[&quot;application specific tag&quot;].Tag());</span>
<span class="lineNum">     254 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[&quot;application specific tag&quot;].as&lt;std::string&gt;() ==</span>
<span class="lineNum">     255 </span>            :               &quot;The semantics of the tag\n&quot;
<span class="lineNum">     256 </span>            :               &quot;above may be different for\n&quot;
<span class="lineNum">     257 </span><span class="lineNoCov">          0 :               &quot;different documents.&quot;);</span>
<a name="258"><span class="lineNum">     258 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     259 </span>            : 
<span class="lineNum">     260 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex2_24_GlobalTags) {</span>
<span class="lineNum">     261 </span><span class="lineNoCov">          0 :   Node doc = Load(ex2_24);</span>
<span class="lineNum">     262 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;tag:clarkevans.com,2002:shape&quot;, doc.Tag());</span>
<span class="lineNum">     263 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc.size());</span>
<span class="lineNum">     264 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;tag:clarkevans.com,2002:circle&quot;, doc[0].Tag());</span>
<span class="lineNum">     265 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[0].size());</span>
<span class="lineNum">     266 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[0][&quot;center&quot;].size());</span>
<span class="lineNum">     267 </span><span class="lineNoCov">          0 :   EXPECT_EQ(73, doc[0][&quot;center&quot;][&quot;x&quot;].as&lt;int&gt;());</span>
<span class="lineNum">     268 </span><span class="lineNoCov">          0 :   EXPECT_EQ(129, doc[0][&quot;center&quot;][&quot;y&quot;].as&lt;int&gt;());</span>
<span class="lineNum">     269 </span><span class="lineNoCov">          0 :   EXPECT_EQ(7, doc[0][&quot;radius&quot;].as&lt;int&gt;());</span>
<span class="lineNum">     270 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;tag:clarkevans.com,2002:line&quot;, doc[1].Tag());</span>
<span class="lineNum">     271 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[1].size());</span>
<span class="lineNum">     272 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[1][&quot;start&quot;].size());</span>
<span class="lineNum">     273 </span><span class="lineNoCov">          0 :   EXPECT_EQ(73, doc[1][&quot;start&quot;][&quot;x&quot;].as&lt;int&gt;());</span>
<span class="lineNum">     274 </span><span class="lineNoCov">          0 :   EXPECT_EQ(129, doc[1][&quot;start&quot;][&quot;y&quot;].as&lt;int&gt;());</span>
<span class="lineNum">     275 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[1][&quot;finish&quot;].size());</span>
<span class="lineNum">     276 </span><span class="lineNoCov">          0 :   EXPECT_EQ(89, doc[1][&quot;finish&quot;][&quot;x&quot;].as&lt;int&gt;());</span>
<span class="lineNum">     277 </span><span class="lineNoCov">          0 :   EXPECT_EQ(102, doc[1][&quot;finish&quot;][&quot;y&quot;].as&lt;int&gt;());</span>
<span class="lineNum">     278 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;tag:clarkevans.com,2002:label&quot;, doc[2].Tag());</span>
<span class="lineNum">     279 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc[2].size());</span>
<span class="lineNum">     280 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[2][&quot;start&quot;].size());</span>
<span class="lineNum">     281 </span><span class="lineNoCov">          0 :   EXPECT_EQ(73, doc[2][&quot;start&quot;][&quot;x&quot;].as&lt;int&gt;());</span>
<span class="lineNum">     282 </span><span class="lineNoCov">          0 :   EXPECT_EQ(129, doc[2][&quot;start&quot;][&quot;y&quot;].as&lt;int&gt;());</span>
<span class="lineNum">     283 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;0xFFEEBB&quot;, doc[2][&quot;color&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     284 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Pretty vector drawing.&quot;, doc[2][&quot;text&quot;].as&lt;std::string&gt;());</span>
<a name="285"><span class="lineNum">     285 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     286 </span>            : 
<span class="lineNum">     287 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex2_25_UnorderedSets) {</span>
<span class="lineNum">     288 </span><span class="lineNoCov">          0 :   Node doc = Load(ex2_25);</span>
<span class="lineNum">     289 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;tag:yaml.org,2002:set&quot;, doc.Tag());</span>
<span class="lineNum">     290 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc.size());</span>
<span class="lineNum">     291 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[&quot;Mark McGwire&quot;].IsNull());</span>
<span class="lineNum">     292 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[&quot;Sammy Sosa&quot;].IsNull());</span>
<span class="lineNum">     293 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[&quot;Ken Griffey&quot;].IsNull());</span>
<a name="294"><span class="lineNum">     294 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     295 </span>            : 
<span class="lineNum">     296 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex2_16_OrderedMappings) {</span>
<span class="lineNum">     297 </span><span class="lineNoCov">          0 :   Node doc = Load(ex2_26);</span>
<span class="lineNum">     298 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;tag:yaml.org,2002:omap&quot;, doc.Tag());</span>
<span class="lineNum">     299 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc.size());</span>
<span class="lineNum">     300 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[0].size());</span>
<span class="lineNum">     301 </span><span class="lineNoCov">          0 :   EXPECT_EQ(65, doc[0][&quot;Mark McGwire&quot;].as&lt;int&gt;());</span>
<span class="lineNum">     302 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[1].size());</span>
<span class="lineNum">     303 </span><span class="lineNoCov">          0 :   EXPECT_EQ(63, doc[1][&quot;Sammy Sosa&quot;].as&lt;int&gt;());</span>
<span class="lineNum">     304 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[2].size());</span>
<span class="lineNum">     305 </span><span class="lineNoCov">          0 :   EXPECT_EQ(58, doc[2][&quot;Ken Griffey&quot;].as&lt;int&gt;());</span>
<a name="306"><span class="lineNum">     306 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     307 </span>            : 
<span class="lineNum">     308 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex2_27_Invoice) {</span>
<span class="lineNum">     309 </span><span class="lineNoCov">          0 :   Node doc = Load(ex2_27);</span>
<span class="lineNum">     310 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;tag:clarkevans.com,2002:invoice&quot;, doc.Tag());</span>
<span class="lineNum">     311 </span><span class="lineNoCov">          0 :   EXPECT_EQ(8, doc.size());</span>
<span class="lineNum">     312 </span><span class="lineNoCov">          0 :   EXPECT_EQ(34843, doc[&quot;invoice&quot;].as&lt;int&gt;());</span>
<span class="lineNum">     313 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;2001-01-23&quot;, doc[&quot;date&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     314 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc[&quot;bill-to&quot;].size());</span>
<span class="lineNum">     315 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Chris&quot;, doc[&quot;bill-to&quot;][&quot;given&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     316 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Dumars&quot;, doc[&quot;bill-to&quot;][&quot;family&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     317 </span><span class="lineNoCov">          0 :   EXPECT_EQ(4, doc[&quot;bill-to&quot;][&quot;address&quot;].size());</span>
<span class="lineNum">     318 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[&quot;bill-to&quot;][&quot;address&quot;][&quot;lines&quot;].as&lt;std::string&gt;() ==</span>
<span class="lineNum">     319 </span><span class="lineNoCov">          0 :               &quot;458 Walkman Dr.\nSuite #292\n&quot;);</span>
<span class="lineNum">     320 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[&quot;bill-to&quot;][&quot;address&quot;][&quot;city&quot;].as&lt;std::string&gt;() ==</span>
<span class="lineNum">     321 </span><span class="lineNoCov">          0 :               &quot;Royal Oak&quot;);</span>
<span class="lineNum">     322 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;MI&quot;, doc[&quot;bill-to&quot;][&quot;address&quot;][&quot;state&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     323 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;48046&quot;, doc[&quot;bill-to&quot;][&quot;address&quot;][&quot;postal&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     324 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc[&quot;ship-to&quot;].size());</span>
<span class="lineNum">     325 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Chris&quot;, doc[&quot;ship-to&quot;][&quot;given&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     326 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Dumars&quot;, doc[&quot;ship-to&quot;][&quot;family&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     327 </span><span class="lineNoCov">          0 :   EXPECT_EQ(4, doc[&quot;ship-to&quot;][&quot;address&quot;].size());</span>
<span class="lineNum">     328 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[&quot;ship-to&quot;][&quot;address&quot;][&quot;lines&quot;].as&lt;std::string&gt;() ==</span>
<span class="lineNum">     329 </span><span class="lineNoCov">          0 :               &quot;458 Walkman Dr.\nSuite #292\n&quot;);</span>
<span class="lineNum">     330 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[&quot;ship-to&quot;][&quot;address&quot;][&quot;city&quot;].as&lt;std::string&gt;() ==</span>
<span class="lineNum">     331 </span><span class="lineNoCov">          0 :               &quot;Royal Oak&quot;);</span>
<span class="lineNum">     332 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;MI&quot;, doc[&quot;ship-to&quot;][&quot;address&quot;][&quot;state&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     333 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;48046&quot;, doc[&quot;ship-to&quot;][&quot;address&quot;][&quot;postal&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     334 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[&quot;product&quot;].size());</span>
<span class="lineNum">     335 </span><span class="lineNoCov">          0 :   EXPECT_EQ(4, doc[&quot;product&quot;][0].size());</span>
<span class="lineNum">     336 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;BL394D&quot;, doc[&quot;product&quot;][0][&quot;sku&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     337 </span><span class="lineNoCov">          0 :   EXPECT_EQ(4, doc[&quot;product&quot;][0][&quot;quantity&quot;].as&lt;int&gt;());</span>
<span class="lineNum">     338 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[&quot;product&quot;][0][&quot;description&quot;].as&lt;std::string&gt;() ==</span>
<span class="lineNum">     339 </span><span class="lineNoCov">          0 :               &quot;Basketball&quot;);</span>
<span class="lineNum">     340 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;450.00&quot;, doc[&quot;product&quot;][0][&quot;price&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     341 </span><span class="lineNoCov">          0 :   EXPECT_EQ(4, doc[&quot;product&quot;][1].size());</span>
<span class="lineNum">     342 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;BL4438H&quot;, doc[&quot;product&quot;][1][&quot;sku&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     343 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[&quot;product&quot;][1][&quot;quantity&quot;].as&lt;int&gt;());</span>
<span class="lineNum">     344 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[&quot;product&quot;][1][&quot;description&quot;].as&lt;std::string&gt;() ==</span>
<span class="lineNum">     345 </span><span class="lineNoCov">          0 :               &quot;Super Hoop&quot;);</span>
<span class="lineNum">     346 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;2392.00&quot;, doc[&quot;product&quot;][1][&quot;price&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     347 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;251.42&quot;, doc[&quot;tax&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     348 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;4443.52&quot;, doc[&quot;total&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     349 </span><span class="lineNoCov">          0 :   EXPECT_EQ(</span>
<span class="lineNum">     350 </span>            :       &quot;Late afternoon is best. Backup contact is Nancy Billsmer @ 338-4338.&quot;,
<span class="lineNum">     351 </span><span class="lineNoCov">          0 :       doc[&quot;comments&quot;].as&lt;std::string&gt;());</span>
<a name="352"><span class="lineNum">     352 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     353 </span>            : 
<span class="lineNum">     354 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex2_28_LogFile) {</span>
<span class="lineNum">     355 </span><span class="lineNoCov">          0 :   std::vector&lt;Node&gt; docs = LoadAll(ex2_28);</span>
<span class="lineNum">     356 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, docs.size());</span>
<span class="lineNum">     357 </span>            : 
<span class="lineNum">     358 </span>            :   {
<span class="lineNum">     359 </span><span class="lineNoCov">          0 :     Node doc = docs[0];</span>
<span class="lineNum">     360 </span><span class="lineNoCov">          0 :     EXPECT_EQ(3, doc.size());</span>
<span class="lineNum">     361 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;2001-11-23 15:01:42 -5&quot;, doc[&quot;Time&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     362 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;ed&quot;, doc[&quot;User&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     363 </span><span class="lineNoCov">          0 :     EXPECT_TRUE(doc[&quot;Warning&quot;].as&lt;std::string&gt;() ==</span>
<span class="lineNum">     364 </span><span class="lineNoCov">          0 :                 &quot;This is an error message for the log file&quot;);</span>
<span class="lineNum">     365 </span>            :   }
<span class="lineNum">     366 </span>            : 
<span class="lineNum">     367 </span>            :   {
<span class="lineNum">     368 </span><span class="lineNoCov">          0 :     Node doc = docs[1];</span>
<span class="lineNum">     369 </span><span class="lineNoCov">          0 :     EXPECT_EQ(3, doc.size());</span>
<span class="lineNum">     370 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;2001-11-23 15:02:31 -5&quot;, doc[&quot;Time&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     371 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;ed&quot;, doc[&quot;User&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     372 </span><span class="lineNoCov">          0 :     EXPECT_TRUE(doc[&quot;Warning&quot;].as&lt;std::string&gt;() ==</span>
<span class="lineNum">     373 </span><span class="lineNoCov">          0 :                 &quot;A slightly different error message.&quot;);</span>
<span class="lineNum">     374 </span>            :   }
<span class="lineNum">     375 </span>            : 
<span class="lineNum">     376 </span>            :   {
<span class="lineNum">     377 </span><span class="lineNoCov">          0 :     Node doc = docs[2];</span>
<span class="lineNum">     378 </span><span class="lineNoCov">          0 :     EXPECT_EQ(4, doc.size());</span>
<span class="lineNum">     379 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;2001-11-23 15:03:17 -5&quot;, doc[&quot;Date&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     380 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;ed&quot;, doc[&quot;User&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     381 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;Unknown variable \&quot;bar\&quot;&quot;, doc[&quot;Fatal&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     382 </span><span class="lineNoCov">          0 :     EXPECT_EQ(2, doc[&quot;Stack&quot;].size());</span>
<span class="lineNum">     383 </span><span class="lineNoCov">          0 :     EXPECT_EQ(3, doc[&quot;Stack&quot;][0].size());</span>
<span class="lineNum">     384 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;TopClass.py&quot;, doc[&quot;Stack&quot;][0][&quot;file&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     385 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;23&quot;, doc[&quot;Stack&quot;][0][&quot;line&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     386 </span><span class="lineNoCov">          0 :     EXPECT_TRUE(doc[&quot;Stack&quot;][0][&quot;code&quot;].as&lt;std::string&gt;() ==</span>
<span class="lineNum">     387 </span><span class="lineNoCov">          0 :                 &quot;x = MoreObject(\&quot;345\\n\&quot;)\n&quot;);</span>
<span class="lineNum">     388 </span><span class="lineNoCov">          0 :     EXPECT_EQ(3, doc[&quot;Stack&quot;][1].size());</span>
<span class="lineNum">     389 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;MoreClass.py&quot;, doc[&quot;Stack&quot;][1][&quot;file&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     390 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;58&quot;, doc[&quot;Stack&quot;][1][&quot;line&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     391 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;foo = bar&quot;, doc[&quot;Stack&quot;][1][&quot;code&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     392 </span>            :   }
<span class="lineNum">     393 </span><span class="lineNoCov">          0 : }</span>
<span class="lineNum">     394 </span>            : 
<a name="395"><span class="lineNum">     395 </span>            : // TODO: 5.1 - 5.2 BOM</a>
<span class="lineNum">     396 </span>            : 
<span class="lineNum">     397 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex5_3_BlockStructureIndicators) {</span>
<span class="lineNum">     398 </span><span class="lineNoCov">          0 :   Node doc = Load(ex5_3);</span>
<span class="lineNum">     399 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc.size());</span>
<span class="lineNum">     400 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[&quot;sequence&quot;].size());</span>
<span class="lineNum">     401 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;one&quot;, doc[&quot;sequence&quot;][0].as&lt;std::string&gt;());</span>
<span class="lineNum">     402 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;two&quot;, doc[&quot;sequence&quot;][1].as&lt;std::string&gt;());</span>
<span class="lineNum">     403 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[&quot;mapping&quot;].size());</span>
<span class="lineNum">     404 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;blue&quot;, doc[&quot;mapping&quot;][&quot;sky&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     405 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;green&quot;, doc[&quot;mapping&quot;][&quot;sea&quot;].as&lt;std::string&gt;());</span>
<a name="406"><span class="lineNum">     406 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     407 </span>            : 
<span class="lineNum">     408 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex5_4_FlowStructureIndicators) {</span>
<span class="lineNum">     409 </span><span class="lineNoCov">          0 :   Node doc = Load(ex5_4);</span>
<span class="lineNum">     410 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc.size());</span>
<span class="lineNum">     411 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[&quot;sequence&quot;].size());</span>
<span class="lineNum">     412 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;one&quot;, doc[&quot;sequence&quot;][0].as&lt;std::string&gt;());</span>
<span class="lineNum">     413 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;two&quot;, doc[&quot;sequence&quot;][1].as&lt;std::string&gt;());</span>
<span class="lineNum">     414 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[&quot;mapping&quot;].size());</span>
<span class="lineNum">     415 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;blue&quot;, doc[&quot;mapping&quot;][&quot;sky&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     416 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;green&quot;, doc[&quot;mapping&quot;][&quot;sea&quot;].as&lt;std::string&gt;());</span>
<a name="417"><span class="lineNum">     417 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     418 </span>            : 
<span class="lineNum">     419 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex5_5_CommentIndicator) {</span>
<span class="lineNum">     420 </span><span class="lineNoCov">          0 :   Node doc = Load(ex5_5);</span>
<span class="lineNum">     421 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc.IsNull());</span>
<a name="422"><span class="lineNum">     422 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     423 </span>            : 
<span class="lineNum">     424 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex5_6_NodePropertyIndicators) {</span>
<span class="lineNum">     425 </span><span class="lineNoCov">          0 :   Node doc = Load(ex5_6);</span>
<span class="lineNum">     426 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc.size());</span>
<span class="lineNum">     427 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[&quot;anchored&quot;].as&lt;std::string&gt;() ==</span>
<span class="lineNum">     428 </span><span class="lineNoCov">          0 :               &quot;value&quot;);  // TODO: assert tag</span>
<span class="lineNum">     429 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;value&quot;, doc[&quot;alias&quot;].as&lt;std::string&gt;());</span>
<a name="430"><span class="lineNum">     430 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     431 </span>            : 
<span class="lineNum">     432 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex5_7_BlockScalarIndicators) {</span>
<span class="lineNum">     433 </span><span class="lineNoCov">          0 :   Node doc = Load(ex5_7);</span>
<span class="lineNum">     434 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc.size());</span>
<span class="lineNum">     435 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;some\ntext\n&quot;, doc[&quot;literal&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     436 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;some text\n&quot;, doc[&quot;folded&quot;].as&lt;std::string&gt;());</span>
<a name="437"><span class="lineNum">     437 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     438 </span>            : 
<span class="lineNum">     439 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex5_8_QuotedScalarIndicators) {</span>
<span class="lineNum">     440 </span><span class="lineNoCov">          0 :   Node doc = Load(ex5_8);</span>
<span class="lineNum">     441 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc.size());</span>
<span class="lineNum">     442 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;text&quot;, doc[&quot;single&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     443 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;text&quot;, doc[&quot;double&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     444 </span><span class="lineNoCov">          0 : }</span>
<span class="lineNum">     445 </span>            : 
<span class="lineNum">     446 </span>            : // TODO: 5.9 directive
<a name="447"><span class="lineNum">     447 </span>            : // TODO: 5.10 reserved indicator</a>
<span class="lineNum">     448 </span>            : 
<span class="lineNum">     449 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex5_11_LineBreakCharacters) {</span>
<span class="lineNum">     450 </span><span class="lineNoCov">          0 :   Node doc = Load(ex5_11);</span>
<span class="lineNum">     451 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc.as&lt;std::string&gt;() ==</span>
<span class="lineNum">     452 </span><span class="lineNoCov">          0 :               &quot;Line break (no glyph)\nLine break (glyphed)\n&quot;);</span>
<a name="453"><span class="lineNum">     453 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     454 </span>            : 
<span class="lineNum">     455 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex5_12_TabsAndSpaces) {</span>
<span class="lineNum">     456 </span><span class="lineNoCov">          0 :   Node doc = Load(ex5_12);</span>
<span class="lineNum">     457 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc.size());</span>
<span class="lineNum">     458 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Quoted\t&quot;, doc[&quot;quoted&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     459 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[&quot;block&quot;].as&lt;std::string&gt;() ==</span>
<span class="lineNum">     460 </span>            :               &quot;void main() {\n&quot;
<span class="lineNum">     461 </span>            :               &quot;\tprintf(\&quot;Hello, world!\\n\&quot;);\n&quot;
<span class="lineNum">     462 </span><span class="lineNoCov">          0 :               &quot;}&quot;);</span>
<a name="463"><span class="lineNum">     463 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     464 </span>            : 
<span class="lineNum">     465 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex5_13_EscapedCharacters) {</span>
<span class="lineNum">     466 </span><span class="lineNoCov">          0 :   Node doc = Load(ex5_13);</span>
<span class="lineNum">     467 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc.as&lt;std::string&gt;() ==</span>
<span class="lineNum">     468 </span>            :               &quot;Fun with \x5C \x22 \x07 \x08 \x1B \x0C \x0A \x0D \x09 \x0B &quot; +
<span class="lineNum">     469 </span>            :                   std::string(&quot;\x00&quot;, 1) +
<span class="lineNum">     470 </span><span class="lineNoCov">          0 :                   &quot; \x20 \xA0 \x85 \xe2\x80\xa8 \xe2\x80\xa9 A A A&quot;);</span>
<a name="471"><span class="lineNum">     471 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     472 </span>            : 
<span class="lineNum">     473 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex5_14_InvalidEscapedCharacters) {</span>
<span class="lineNum">     474 </span><span class="lineNoCov">          0 :   EXPECT_THROW_PARSER_EXCEPTION(Load(ex5_14),</span>
<span class="lineNum">     475 </span>            :                                 std::string(ErrorMsg::INVALID_ESCAPE) + &quot;c&quot;);
<a name="476"><span class="lineNum">     476 </span>            : }</a>
<span class="lineNum">     477 </span>            : 
<span class="lineNum">     478 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_1_IndentationSpaces) {</span>
<span class="lineNum">     479 </span><span class="lineNoCov">          0 :   Node doc = Load(ex6_1);</span>
<span class="lineNum">     480 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc.size());</span>
<span class="lineNum">     481 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[&quot;Not indented&quot;].size());</span>
<span class="lineNum">     482 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[&quot;Not indented&quot;][&quot;By one space&quot;].as&lt;std::string&gt;() ==</span>
<span class="lineNum">     483 </span><span class="lineNoCov">          0 :               &quot;By four\n  spaces\n&quot;);</span>
<span class="lineNum">     484 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc[&quot;Not indented&quot;][&quot;Flow style&quot;].size());</span>
<span class="lineNum">     485 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[&quot;Not indented&quot;][&quot;Flow style&quot;][0].as&lt;std::string&gt;() ==</span>
<span class="lineNum">     486 </span><span class="lineNoCov">          0 :               &quot;By two&quot;);</span>
<span class="lineNum">     487 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[&quot;Not indented&quot;][&quot;Flow style&quot;][1].as&lt;std::string&gt;() ==</span>
<span class="lineNum">     488 </span><span class="lineNoCov">          0 :               &quot;Also by two&quot;);</span>
<span class="lineNum">     489 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[&quot;Not indented&quot;][&quot;Flow style&quot;][2].as&lt;std::string&gt;() ==</span>
<span class="lineNum">     490 </span><span class="lineNoCov">          0 :               &quot;Still by two&quot;);</span>
<a name="491"><span class="lineNum">     491 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     492 </span>            : 
<span class="lineNum">     493 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_2_IndentationIndicators) {</span>
<span class="lineNum">     494 </span><span class="lineNoCov">          0 :   Node doc = Load(ex6_2);</span>
<span class="lineNum">     495 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc.size());</span>
<span class="lineNum">     496 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[&quot;a&quot;].size());</span>
<span class="lineNum">     497 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;b&quot;, doc[&quot;a&quot;][0].as&lt;std::string&gt;());</span>
<span class="lineNum">     498 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[&quot;a&quot;][1].size());</span>
<span class="lineNum">     499 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;c&quot;, doc[&quot;a&quot;][1][0].as&lt;std::string&gt;());</span>
<span class="lineNum">     500 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;d&quot;, doc[&quot;a&quot;][1][1].as&lt;std::string&gt;());</span>
<a name="501"><span class="lineNum">     501 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     502 </span>            : 
<span class="lineNum">     503 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_3_SeparationSpaces) {</span>
<span class="lineNum">     504 </span><span class="lineNoCov">          0 :   Node doc = Load(ex6_3);</span>
<span class="lineNum">     505 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc.size());</span>
<span class="lineNum">     506 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[0].size());</span>
<span class="lineNum">     507 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;bar&quot;, doc[0][&quot;foo&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     508 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[1].size());</span>
<span class="lineNum">     509 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;baz&quot;, doc[1][0].as&lt;std::string&gt;());</span>
<span class="lineNum">     510 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;baz&quot;, doc[1][1].as&lt;std::string&gt;());</span>
<a name="511"><span class="lineNum">     511 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     512 </span>            : 
<span class="lineNum">     513 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_4_LinePrefixes) {</span>
<span class="lineNum">     514 </span><span class="lineNoCov">          0 :   Node doc = Load(ex6_4);</span>
<span class="lineNum">     515 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc.size());</span>
<span class="lineNum">     516 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;text lines&quot;, doc[&quot;plain&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     517 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;text lines&quot;, doc[&quot;quoted&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     518 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;text\n \tlines\n&quot;, doc[&quot;block&quot;].as&lt;std::string&gt;());</span>
<a name="519"><span class="lineNum">     519 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     520 </span>            : 
<span class="lineNum">     521 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_5_EmptyLines) {</span>
<span class="lineNum">     522 </span><span class="lineNoCov">          0 :   Node doc = Load(ex6_5);</span>
<span class="lineNum">     523 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc.size());</span>
<span class="lineNum">     524 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Empty line\nas a line feed&quot;, doc[&quot;Folding&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     525 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Clipped empty lines\n&quot;, doc[&quot;Chomping&quot;].as&lt;std::string&gt;());</span>
<a name="526"><span class="lineNum">     526 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     527 </span>            : 
<span class="lineNum">     528 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_6_LineFolding) {</span>
<span class="lineNum">     529 </span><span class="lineNoCov">          0 :   Node doc = Load(ex6_6);</span>
<span class="lineNum">     530 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;trimmed\n\n\nas space&quot;, doc.as&lt;std::string&gt;());</span>
<a name="531"><span class="lineNum">     531 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     532 </span>            : 
<span class="lineNum">     533 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_7_BlockFolding) {</span>
<span class="lineNum">     534 </span><span class="lineNoCov">          0 :   Node doc = Load(ex6_7);</span>
<span class="lineNum">     535 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;foo \n\n\t bar\n\nbaz\n&quot;, doc.as&lt;std::string&gt;());</span>
<a name="536"><span class="lineNum">     536 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     537 </span>            : 
<span class="lineNum">     538 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_8_FlowFolding) {</span>
<span class="lineNum">     539 </span><span class="lineNoCov">          0 :   Node doc = Load(ex6_8);</span>
<span class="lineNum">     540 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot; foo\nbar\nbaz &quot;, doc.as&lt;std::string&gt;());</span>
<a name="541"><span class="lineNum">     541 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     542 </span>            : 
<span class="lineNum">     543 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_9_SeparatedComment) {</span>
<span class="lineNum">     544 </span><span class="lineNoCov">          0 :   Node doc = Load(ex6_9);</span>
<span class="lineNum">     545 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc.size());</span>
<span class="lineNum">     546 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;value&quot;, doc[&quot;key&quot;].as&lt;std::string&gt;());</span>
<a name="547"><span class="lineNum">     547 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     548 </span>            : 
<span class="lineNum">     549 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_10_CommentLines) {</span>
<span class="lineNum">     550 </span><span class="lineNoCov">          0 :   Node doc = Load(ex6_10);</span>
<span class="lineNum">     551 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc.IsNull());</span>
<a name="552"><span class="lineNum">     552 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     553 </span>            : 
<span class="lineNum">     554 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_11_MultiLineComments) {</span>
<span class="lineNum">     555 </span><span class="lineNoCov">          0 :   Node doc = Load(ex6_11);</span>
<span class="lineNum">     556 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc.size());</span>
<span class="lineNum">     557 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;value&quot;, doc[&quot;key&quot;].as&lt;std::string&gt;());</span>
<a name="558"><span class="lineNum">     558 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     559 </span>            : 
<span class="lineNum">     560 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_12_SeparationSpacesII) {</span>
<span class="lineNum">     561 </span><span class="lineNoCov">          0 :   Node doc = Load(ex6_12);</span>
<span class="lineNum">     562 </span>            : 
<span class="lineNum">     563 </span><span class="lineNoCov">          0 :   std::map&lt;std::string, std::string&gt; sammy;</span>
<span class="lineNum">     564 </span><span class="lineNoCov">          0 :   sammy[&quot;first&quot;] = &quot;Sammy&quot;;</span>
<span class="lineNum">     565 </span><span class="lineNoCov">          0 :   sammy[&quot;last&quot;] = &quot;Sosa&quot;;</span>
<span class="lineNum">     566 </span>            : 
<span class="lineNum">     567 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc.size());</span>
<span class="lineNum">     568 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[sammy].size());</span>
<span class="lineNum">     569 </span><span class="lineNoCov">          0 :   EXPECT_EQ(65, doc[sammy][&quot;hr&quot;].as&lt;int&gt;());</span>
<span class="lineNum">     570 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;0.278&quot;, doc[sammy][&quot;avg&quot;].as&lt;std::string&gt;());</span>
<a name="571"><span class="lineNum">     571 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     572 </span>            : 
<span class="lineNum">     573 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_13_ReservedDirectives) {</span>
<span class="lineNum">     574 </span><span class="lineNoCov">          0 :   Node doc = Load(ex6_13);</span>
<span class="lineNum">     575 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;foo&quot;, doc.as&lt;std::string&gt;());</span>
<a name="576"><span class="lineNum">     576 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     577 </span>            : 
<span class="lineNum">     578 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_14_YAMLDirective) {</span>
<span class="lineNum">     579 </span><span class="lineNoCov">          0 :   Node doc = Load(ex6_14);</span>
<span class="lineNum">     580 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;foo&quot;, doc.as&lt;std::string&gt;());</span>
<a name="581"><span class="lineNum">     581 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     582 </span>            : 
<span class="lineNum">     583 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_15_InvalidRepeatedYAMLDirective) {</span>
<span class="lineNum">     584 </span><span class="lineNoCov">          0 :   EXPECT_THROW_PARSER_EXCEPTION(Load(ex6_15),</span>
<span class="lineNum">     585 </span>            :                                 ErrorMsg::REPEATED_YAML_DIRECTIVE);
<a name="586"><span class="lineNum">     586 </span>            : }</a>
<span class="lineNum">     587 </span>            : 
<span class="lineNum">     588 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_16_TagDirective) {</span>
<span class="lineNum">     589 </span><span class="lineNoCov">          0 :   Node doc = Load(ex6_16);</span>
<span class="lineNum">     590 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;tag:yaml.org,2002:str&quot;, doc.Tag());</span>
<span class="lineNum">     591 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;foo&quot;, doc.as&lt;std::string&gt;());</span>
<a name="592"><span class="lineNum">     592 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     593 </span>            : 
<span class="lineNum">     594 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_17_InvalidRepeatedTagDirective) {</span>
<span class="lineNum">     595 </span><span class="lineNoCov">          0 :   EXPECT_THROW_PARSER_EXCEPTION(Load(ex6_17), ErrorMsg::REPEATED_TAG_DIRECTIVE);</span>
<a name="596"><span class="lineNum">     596 </span>            : }</a>
<span class="lineNum">     597 </span>            : 
<span class="lineNum">     598 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_18_PrimaryTagHandle) {</span>
<span class="lineNum">     599 </span><span class="lineNoCov">          0 :   std::vector&lt;Node&gt; docs = LoadAll(ex6_18);</span>
<span class="lineNum">     600 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, docs.size());</span>
<span class="lineNum">     601 </span>            : 
<span class="lineNum">     602 </span>            :   {
<span class="lineNum">     603 </span><span class="lineNoCov">          0 :     Node doc = docs[0];</span>
<span class="lineNum">     604 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;!foo&quot;, doc.Tag());</span>
<span class="lineNum">     605 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;bar&quot;, doc.as&lt;std::string&gt;());</span>
<span class="lineNum">     606 </span>            :   }
<span class="lineNum">     607 </span>            : 
<span class="lineNum">     608 </span>            :   {
<span class="lineNum">     609 </span><span class="lineNoCov">          0 :     Node doc = docs[1];</span>
<span class="lineNum">     610 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;tag:example.com,2000:app/foo&quot;, doc.Tag());</span>
<span class="lineNum">     611 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;bar&quot;, doc.as&lt;std::string&gt;());</span>
<span class="lineNum">     612 </span>            :   }
<a name="613"><span class="lineNum">     613 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     614 </span>            : 
<span class="lineNum">     615 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_19_SecondaryTagHandle) {</span>
<span class="lineNum">     616 </span><span class="lineNoCov">          0 :   Node doc = Load(ex6_19);</span>
<span class="lineNum">     617 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;tag:example.com,2000:app/int&quot;, doc.Tag());</span>
<span class="lineNum">     618 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;1 - 3&quot;, doc.as&lt;std::string&gt;());</span>
<a name="619"><span class="lineNum">     619 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     620 </span>            : 
<span class="lineNum">     621 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_20_TagHandles) {</span>
<span class="lineNum">     622 </span><span class="lineNoCov">          0 :   Node doc = Load(ex6_20);</span>
<span class="lineNum">     623 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;tag:example.com,2000:app/foo&quot;, doc.Tag());</span>
<span class="lineNum">     624 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;bar&quot;, doc.as&lt;std::string&gt;());</span>
<a name="625"><span class="lineNum">     625 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     626 </span>            : 
<span class="lineNum">     627 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_21_LocalTagPrefix) {</span>
<span class="lineNum">     628 </span><span class="lineNoCov">          0 :   std::vector&lt;Node&gt; docs = LoadAll(ex6_21);</span>
<span class="lineNum">     629 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, docs.size());</span>
<span class="lineNum">     630 </span>            : 
<span class="lineNum">     631 </span>            :   {
<span class="lineNum">     632 </span><span class="lineNoCov">          0 :     Node doc = docs[0];</span>
<span class="lineNum">     633 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;!my-light&quot;, doc.Tag());</span>
<span class="lineNum">     634 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;fluorescent&quot;, doc.as&lt;std::string&gt;());</span>
<span class="lineNum">     635 </span>            :   }
<span class="lineNum">     636 </span>            : 
<span class="lineNum">     637 </span>            :   {
<span class="lineNum">     638 </span><span class="lineNoCov">          0 :     Node doc = docs[1];</span>
<span class="lineNum">     639 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;!my-light&quot;, doc.Tag());</span>
<span class="lineNum">     640 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;green&quot;, doc.as&lt;std::string&gt;());</span>
<span class="lineNum">     641 </span>            :   }
<a name="642"><span class="lineNum">     642 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     643 </span>            : 
<span class="lineNum">     644 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_22_GlobalTagPrefix) {</span>
<span class="lineNum">     645 </span><span class="lineNoCov">          0 :   Node doc = Load(ex6_22);</span>
<span class="lineNum">     646 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc.size());</span>
<span class="lineNum">     647 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;tag:example.com,2000:app/foo&quot;, doc[0].Tag());</span>
<span class="lineNum">     648 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;bar&quot;, doc[0].as&lt;std::string&gt;());</span>
<a name="649"><span class="lineNum">     649 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     650 </span>            : 
<span class="lineNum">     651 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_23_NodeProperties) {</span>
<span class="lineNum">     652 </span><span class="lineNoCov">          0 :   Node doc = Load(ex6_23);</span>
<span class="lineNum">     653 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc.size());</span>
<span class="lineNum">     654 </span><span class="lineNoCov">          0 :   for (const_iterator it = doc.begin(); it != doc.end(); ++it) {</span>
<span class="lineNum">     655 </span><span class="lineNoCov">          0 :     if (it-&gt;first.as&lt;std::string&gt;() == &quot;foo&quot;) {</span>
<span class="lineNum">     656 </span><span class="lineNoCov">          0 :       EXPECT_EQ(&quot;tag:yaml.org,2002:str&quot;, it-&gt;first.Tag());</span>
<span class="lineNum">     657 </span><span class="lineNoCov">          0 :       EXPECT_EQ(&quot;tag:yaml.org,2002:str&quot;, it-&gt;second.Tag());</span>
<span class="lineNum">     658 </span><span class="lineNoCov">          0 :       EXPECT_EQ(&quot;bar&quot;, it-&gt;second.as&lt;std::string&gt;());</span>
<span class="lineNum">     659 </span><span class="lineNoCov">          0 :     } else if (it-&gt;first.as&lt;std::string&gt;() == &quot;baz&quot;) {</span>
<span class="lineNum">     660 </span><span class="lineNoCov">          0 :       EXPECT_EQ(&quot;foo&quot;, it-&gt;second.as&lt;std::string&gt;());</span>
<span class="lineNum">     661 </span>            :     } else
<span class="lineNum">     662 </span><span class="lineNoCov">          0 :       FAIL() &lt;&lt; &quot;unknown key&quot;;</span>
<span class="lineNum">     663 </span>            :   }
<a name="664"><span class="lineNum">     664 </span>            : }</a>
<span class="lineNum">     665 </span>            : 
<span class="lineNum">     666 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_24_VerbatimTags) {</span>
<span class="lineNum">     667 </span><span class="lineNoCov">          0 :   Node doc = Load(ex6_24);</span>
<span class="lineNum">     668 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc.size());</span>
<span class="lineNum">     669 </span><span class="lineNoCov">          0 :   for (const_iterator it = doc.begin(); it != doc.end(); ++it) {</span>
<span class="lineNum">     670 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;tag:yaml.org,2002:str&quot;, it-&gt;first.Tag());</span>
<span class="lineNum">     671 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;foo&quot;, it-&gt;first.as&lt;std::string&gt;());</span>
<span class="lineNum">     672 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;!bar&quot;, it-&gt;second.Tag());</span>
<span class="lineNum">     673 </span><span class="lineNoCov">          0 :     EXPECT_EQ(&quot;baz&quot;, it-&gt;second.as&lt;std::string&gt;());</span>
<span class="lineNum">     674 </span>            :   }
<a name="675"><span class="lineNum">     675 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     676 </span>            : 
<span class="lineNum">     677 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, DISABLED_Ex6_25_InvalidVerbatimTags) {</span>
<span class="lineNum">     678 </span><span class="lineNoCov">          0 :   Node doc = Load(ex6_25);</span>
<span class="lineNum">     679 </span>            :   // TODO: check tags (but we probably will say these are valid, I think)
<span class="lineNum">     680 </span><span class="lineNoCov">          0 :   FAIL() &lt;&lt; &quot;not implemented yet&quot;;</span>
<a name="681"><span class="lineNum">     681 </span>            : }</a>
<span class="lineNum">     682 </span>            : 
<span class="lineNum">     683 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_26_TagShorthands) {</span>
<span class="lineNum">     684 </span><span class="lineNoCov">          0 :   Node doc = Load(ex6_26);</span>
<span class="lineNum">     685 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc.size());</span>
<span class="lineNum">     686 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;!local&quot;, doc[0].Tag());</span>
<span class="lineNum">     687 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;foo&quot;, doc[0].as&lt;std::string&gt;());</span>
<span class="lineNum">     688 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;tag:yaml.org,2002:str&quot;, doc[1].Tag());</span>
<span class="lineNum">     689 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;bar&quot;, doc[1].as&lt;std::string&gt;());</span>
<span class="lineNum">     690 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;tag:example.com,2000:app/tag%21&quot;, doc[2].Tag());</span>
<span class="lineNum">     691 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;baz&quot;, doc[2].as&lt;std::string&gt;());</span>
<a name="692"><span class="lineNum">     692 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     693 </span>            : 
<span class="lineNum">     694 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_27a_InvalidTagShorthands) {</span>
<span class="lineNum">     695 </span><span class="lineNoCov">          0 :   EXPECT_THROW_PARSER_EXCEPTION(Load(ex6_27a), ErrorMsg::TAG_WITH_NO_SUFFIX);</span>
<span class="lineNum">     696 </span>            : }
<a name="697"><span class="lineNum">     697 </span>            : </a>
<span class="lineNum">     698 </span>            : // TODO: should we reject this one (since !h! is not declared)?
<span class="lineNum">     699 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, DISABLED_Ex6_27b_InvalidTagShorthands) {</span>
<span class="lineNum">     700 </span><span class="lineNoCov">          0 :   Load(ex6_27b);</span>
<span class="lineNum">     701 </span><span class="lineNoCov">          0 :   FAIL() &lt;&lt; &quot;not implemented yet&quot;;</span>
<a name="702"><span class="lineNum">     702 </span>            : }</a>
<span class="lineNum">     703 </span>            : 
<span class="lineNum">     704 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_28_NonSpecificTags) {</span>
<span class="lineNum">     705 </span><span class="lineNoCov">          0 :   Node doc = Load(ex6_28);</span>
<span class="lineNum">     706 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc.size());</span>
<span class="lineNum">     707 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;12&quot;, doc[0].as&lt;std::string&gt;());  // TODO: check tags. How?</span>
<span class="lineNum">     708 </span><span class="lineNoCov">          0 :   EXPECT_EQ(12, doc[1].as&lt;int&gt;());</span>
<span class="lineNum">     709 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;12&quot;, doc[2].as&lt;std::string&gt;());</span>
<a name="710"><span class="lineNum">     710 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     711 </span>            : 
<span class="lineNum">     712 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex6_29_NodeAnchors) {</span>
<span class="lineNum">     713 </span><span class="lineNoCov">          0 :   Node doc = Load(ex6_29);</span>
<span class="lineNum">     714 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc.size());</span>
<span class="lineNum">     715 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Value&quot;, doc[&quot;First occurrence&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     716 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Value&quot;, doc[&quot;Second occurrence&quot;].as&lt;std::string&gt;());</span>
<a name="717"><span class="lineNum">     717 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     718 </span>            : 
<span class="lineNum">     719 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex7_1_AliasNodes) {</span>
<span class="lineNum">     720 </span><span class="lineNoCov">          0 :   Node doc = Load(ex7_1);</span>
<span class="lineNum">     721 </span><span class="lineNoCov">          0 :   EXPECT_EQ(4, doc.size());</span>
<span class="lineNum">     722 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Foo&quot;, doc[&quot;First occurrence&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     723 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Foo&quot;, doc[&quot;Second occurrence&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     724 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Bar&quot;, doc[&quot;Override anchor&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     725 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Bar&quot;, doc[&quot;Reuse anchor&quot;].as&lt;std::string&gt;());</span>
<a name="726"><span class="lineNum">     726 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     727 </span>            : 
<span class="lineNum">     728 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex7_2_EmptyNodes) {</span>
<span class="lineNum">     729 </span><span class="lineNoCov">          0 :   Node doc = Load(ex7_2);</span>
<span class="lineNum">     730 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc.size());</span>
<span class="lineNum">     731 </span><span class="lineNoCov">          0 :   for (const_iterator it = doc.begin(); it != doc.end(); ++it) {</span>
<span class="lineNum">     732 </span><span class="lineNoCov">          0 :     if (it-&gt;first.as&lt;std::string&gt;() == &quot;foo&quot;) {</span>
<span class="lineNum">     733 </span><span class="lineNoCov">          0 :       EXPECT_EQ(&quot;tag:yaml.org,2002:str&quot;, it-&gt;second.Tag());</span>
<span class="lineNum">     734 </span><span class="lineNoCov">          0 :       EXPECT_EQ(&quot;&quot;, it-&gt;second.as&lt;std::string&gt;());</span>
<span class="lineNum">     735 </span><span class="lineNoCov">          0 :     } else if (it-&gt;first.as&lt;std::string&gt;() == &quot;&quot;) {</span>
<span class="lineNum">     736 </span><span class="lineNoCov">          0 :       EXPECT_EQ(&quot;tag:yaml.org,2002:str&quot;, it-&gt;first.Tag());</span>
<span class="lineNum">     737 </span><span class="lineNoCov">          0 :       EXPECT_EQ(&quot;bar&quot;, it-&gt;second.as&lt;std::string&gt;());</span>
<span class="lineNum">     738 </span>            :     } else
<span class="lineNum">     739 </span><span class="lineNoCov">          0 :       FAIL() &lt;&lt; &quot;unexpected key&quot;;</span>
<span class="lineNum">     740 </span>            :   }
<a name="741"><span class="lineNum">     741 </span>            : }</a>
<span class="lineNum">     742 </span>            : 
<span class="lineNum">     743 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex7_3_CompletelyEmptyNodes) {</span>
<span class="lineNum">     744 </span><span class="lineNoCov">          0 :   Node doc = Load(ex7_3);</span>
<span class="lineNum">     745 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc.size());</span>
<span class="lineNum">     746 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[&quot;foo&quot;].IsNull());</span>
<span class="lineNum">     747 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;bar&quot;, doc[Null].as&lt;std::string&gt;());</span>
<a name="748"><span class="lineNum">     748 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     749 </span>            : 
<span class="lineNum">     750 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex7_4_DoubleQuotedImplicitKeys) {</span>
<span class="lineNum">     751 </span><span class="lineNoCov">          0 :   Node doc = Load(ex7_4);</span>
<span class="lineNum">     752 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc.size());</span>
<span class="lineNum">     753 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[&quot;implicit block key&quot;].size());</span>
<span class="lineNum">     754 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[&quot;implicit block key&quot;][0].size());</span>
<span class="lineNum">     755 </span><span class="lineNoCov">          0 :   EXPECT_EQ(</span>
<span class="lineNum">     756 </span>            :       &quot;value&quot;,
<span class="lineNum">     757 </span><span class="lineNoCov">          0 :       doc[&quot;implicit block key&quot;][0][&quot;implicit flow key&quot;].as&lt;std::string&gt;());</span>
<a name="758"><span class="lineNum">     758 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     759 </span>            : 
<span class="lineNum">     760 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex7_5_DoubleQuotedLineBreaks) {</span>
<span class="lineNum">     761 </span><span class="lineNoCov">          0 :   Node doc = Load(ex7_5);</span>
<span class="lineNum">     762 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc.as&lt;std::string&gt;() ==</span>
<span class="lineNum">     763 </span><span class="lineNoCov">          0 :               &quot;folded to a space,\nto a line feed, or \t \tnon-content&quot;);</span>
<a name="764"><span class="lineNum">     764 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     765 </span>            : 
<span class="lineNum">     766 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex7_6_DoubleQuotedLines) {</span>
<span class="lineNum">     767 </span><span class="lineNoCov">          0 :   Node doc = Load(ex7_6);</span>
<span class="lineNum">     768 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc.as&lt;std::string&gt;() ==</span>
<span class="lineNum">     769 </span><span class="lineNoCov">          0 :               &quot; 1st non-empty\n2nd non-empty 3rd non-empty &quot;);</span>
<a name="770"><span class="lineNum">     770 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     771 </span>            : 
<span class="lineNum">     772 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex7_7_SingleQuotedCharacters) {</span>
<span class="lineNum">     773 </span><span class="lineNoCov">          0 :   Node doc = Load(ex7_7);</span>
<span class="lineNum">     774 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;here's to \&quot;quotes\&quot;&quot;, doc.as&lt;std::string&gt;());</span>
<a name="775"><span class="lineNum">     775 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     776 </span>            : 
<span class="lineNum">     777 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex7_8_SingleQuotedImplicitKeys) {</span>
<span class="lineNum">     778 </span><span class="lineNoCov">          0 :   Node doc = Load(ex7_8);</span>
<span class="lineNum">     779 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc.size());</span>
<span class="lineNum">     780 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[&quot;implicit block key&quot;].size());</span>
<span class="lineNum">     781 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[&quot;implicit block key&quot;][0].size());</span>
<span class="lineNum">     782 </span><span class="lineNoCov">          0 :   EXPECT_EQ(</span>
<span class="lineNum">     783 </span>            :       &quot;value&quot;,
<span class="lineNum">     784 </span><span class="lineNoCov">          0 :       doc[&quot;implicit block key&quot;][0][&quot;implicit flow key&quot;].as&lt;std::string&gt;());</span>
<a name="785"><span class="lineNum">     785 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     786 </span>            : 
<span class="lineNum">     787 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex7_9_SingleQuotedLines) {</span>
<span class="lineNum">     788 </span><span class="lineNoCov">          0 :   Node doc = Load(ex7_9);</span>
<span class="lineNum">     789 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc.as&lt;std::string&gt;() ==</span>
<span class="lineNum">     790 </span><span class="lineNoCov">          0 :               &quot; 1st non-empty\n2nd non-empty 3rd non-empty &quot;);</span>
<a name="791"><span class="lineNum">     791 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     792 </span>            : 
<span class="lineNum">     793 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex7_10_PlainCharacters) {</span>
<span class="lineNum">     794 </span><span class="lineNoCov">          0 :   Node doc = Load(ex7_10);</span>
<span class="lineNum">     795 </span><span class="lineNoCov">          0 :   EXPECT_EQ(6, doc.size());</span>
<span class="lineNum">     796 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;::vector&quot;, doc[0].as&lt;std::string&gt;());</span>
<span class="lineNum">     797 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;: - ()&quot;, doc[1].as&lt;std::string&gt;());</span>
<span class="lineNum">     798 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Up, up, and away!&quot;, doc[2].as&lt;std::string&gt;());</span>
<span class="lineNum">     799 </span><span class="lineNoCov">          0 :   EXPECT_EQ(-123, doc[3].as&lt;int&gt;());</span>
<span class="lineNum">     800 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;http://example.com/foo#bar&quot;, doc[4].as&lt;std::string&gt;());</span>
<span class="lineNum">     801 </span><span class="lineNoCov">          0 :   EXPECT_EQ(5, doc[5].size());</span>
<span class="lineNum">     802 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;::vector&quot;, doc[5][0].as&lt;std::string&gt;());</span>
<span class="lineNum">     803 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;: - ()&quot;, doc[5][1].as&lt;std::string&gt;());</span>
<span class="lineNum">     804 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Up, up, and away!&quot;, doc[5][2].as&lt;std::string&gt;());</span>
<span class="lineNum">     805 </span><span class="lineNoCov">          0 :   EXPECT_EQ(-123, doc[5][3].as&lt;int&gt;());</span>
<span class="lineNum">     806 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;http://example.com/foo#bar&quot;, doc[5][4].as&lt;std::string&gt;());</span>
<a name="807"><span class="lineNum">     807 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     808 </span>            : 
<span class="lineNum">     809 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex7_11_PlainImplicitKeys) {</span>
<span class="lineNum">     810 </span><span class="lineNoCov">          0 :   Node doc = Load(ex7_11);</span>
<span class="lineNum">     811 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc.size());</span>
<span class="lineNum">     812 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[&quot;implicit block key&quot;].size());</span>
<span class="lineNum">     813 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[&quot;implicit block key&quot;][0].size());</span>
<span class="lineNum">     814 </span><span class="lineNoCov">          0 :   EXPECT_EQ(</span>
<span class="lineNum">     815 </span>            :       &quot;value&quot;,
<span class="lineNum">     816 </span><span class="lineNoCov">          0 :       doc[&quot;implicit block key&quot;][0][&quot;implicit flow key&quot;].as&lt;std::string&gt;());</span>
<a name="817"><span class="lineNum">     817 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     818 </span>            : 
<span class="lineNum">     819 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex7_12_PlainLines) {</span>
<span class="lineNum">     820 </span><span class="lineNoCov">          0 :   Node doc = Load(ex7_12);</span>
<span class="lineNum">     821 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc.as&lt;std::string&gt;() ==</span>
<span class="lineNum">     822 </span><span class="lineNoCov">          0 :               &quot;1st non-empty\n2nd non-empty 3rd non-empty&quot;);</span>
<a name="823"><span class="lineNum">     823 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     824 </span>            : 
<span class="lineNum">     825 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex7_13_FlowSequence) {</span>
<span class="lineNum">     826 </span><span class="lineNoCov">          0 :   Node doc = Load(ex7_13);</span>
<span class="lineNum">     827 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc.size());</span>
<span class="lineNum">     828 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[0].size());</span>
<span class="lineNum">     829 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;one&quot;, doc[0][0].as&lt;std::string&gt;());</span>
<span class="lineNum">     830 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;two&quot;, doc[0][1].as&lt;std::string&gt;());</span>
<span class="lineNum">     831 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[1].size());</span>
<span class="lineNum">     832 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;three&quot;, doc[1][0].as&lt;std::string&gt;());</span>
<span class="lineNum">     833 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;four&quot;, doc[1][1].as&lt;std::string&gt;());</span>
<a name="834"><span class="lineNum">     834 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     835 </span>            : 
<span class="lineNum">     836 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex7_14_FlowSequenceEntries) {</span>
<span class="lineNum">     837 </span><span class="lineNoCov">          0 :   Node doc = Load(ex7_14);</span>
<span class="lineNum">     838 </span><span class="lineNoCov">          0 :   EXPECT_EQ(5, doc.size());</span>
<span class="lineNum">     839 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;double quoted&quot;, doc[0].as&lt;std::string&gt;());</span>
<span class="lineNum">     840 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;single quoted&quot;, doc[1].as&lt;std::string&gt;());</span>
<span class="lineNum">     841 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;plain text&quot;, doc[2].as&lt;std::string&gt;());</span>
<span class="lineNum">     842 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[3].size());</span>
<span class="lineNum">     843 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;nested&quot;, doc[3][0].as&lt;std::string&gt;());</span>
<span class="lineNum">     844 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[4].size());</span>
<span class="lineNum">     845 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;pair&quot;, doc[4][&quot;single&quot;].as&lt;std::string&gt;());</span>
<a name="846"><span class="lineNum">     846 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     847 </span>            : 
<span class="lineNum">     848 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex7_15_FlowMappings) {</span>
<span class="lineNum">     849 </span><span class="lineNoCov">          0 :   Node doc = Load(ex7_15);</span>
<span class="lineNum">     850 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc.size());</span>
<span class="lineNum">     851 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[0].size());</span>
<span class="lineNum">     852 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;two&quot;, doc[0][&quot;one&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     853 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;four&quot;, doc[0][&quot;three&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     854 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[1].size());</span>
<span class="lineNum">     855 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;six&quot;, doc[1][&quot;five&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     856 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;eight&quot;, doc[1][&quot;seven&quot;].as&lt;std::string&gt;());</span>
<a name="857"><span class="lineNum">     857 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     858 </span>            : 
<span class="lineNum">     859 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex7_16_FlowMappingEntries) {</span>
<span class="lineNum">     860 </span><span class="lineNoCov">          0 :   Node doc = Load(ex7_16);</span>
<span class="lineNum">     861 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc.size());</span>
<span class="lineNum">     862 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;entry&quot;, doc[&quot;explicit&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     863 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;entry&quot;, doc[&quot;implicit&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     864 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[Null].IsNull());</span>
<a name="865"><span class="lineNum">     865 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     866 </span>            : 
<span class="lineNum">     867 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex7_17_FlowMappingSeparateValues) {</span>
<span class="lineNum">     868 </span><span class="lineNoCov">          0 :   Node doc = Load(ex7_17);</span>
<span class="lineNum">     869 </span><span class="lineNoCov">          0 :   EXPECT_EQ(4, doc.size());</span>
<span class="lineNum">     870 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;separate&quot;, doc[&quot;unquoted&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     871 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[&quot;http://foo.com&quot;].IsNull());</span>
<span class="lineNum">     872 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[&quot;omitted value&quot;].IsNull());</span>
<span class="lineNum">     873 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;omitted key&quot;, doc[Null].as&lt;std::string&gt;());</span>
<a name="874"><span class="lineNum">     874 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     875 </span>            : 
<span class="lineNum">     876 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex7_18_FlowMappingAdjacentValues) {</span>
<span class="lineNum">     877 </span><span class="lineNoCov">          0 :   Node doc = Load(ex7_18);</span>
<span class="lineNum">     878 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc.size());</span>
<span class="lineNum">     879 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;value&quot;, doc[&quot;adjacent&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     880 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;value&quot;, doc[&quot;readable&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     881 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[&quot;empty&quot;].IsNull());</span>
<a name="882"><span class="lineNum">     882 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     883 </span>            : 
<span class="lineNum">     884 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex7_19_SinglePairFlowMappings) {</span>
<span class="lineNum">     885 </span><span class="lineNoCov">          0 :   Node doc = Load(ex7_19);</span>
<span class="lineNum">     886 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc.size());</span>
<span class="lineNum">     887 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[0].size());</span>
<span class="lineNum">     888 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;bar&quot;, doc[0][&quot;foo&quot;].as&lt;std::string&gt;());</span>
<a name="889"><span class="lineNum">     889 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     890 </span>            : 
<span class="lineNum">     891 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex7_20_SinglePairExplicitEntry) {</span>
<span class="lineNum">     892 </span><span class="lineNoCov">          0 :   Node doc = Load(ex7_20);</span>
<span class="lineNum">     893 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc.size());</span>
<span class="lineNum">     894 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[0].size());</span>
<span class="lineNum">     895 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;baz&quot;, doc[0][&quot;foo bar&quot;].as&lt;std::string&gt;());</span>
<a name="896"><span class="lineNum">     896 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     897 </span>            : 
<span class="lineNum">     898 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex7_21_SinglePairImplicitEntries) {</span>
<span class="lineNum">     899 </span><span class="lineNoCov">          0 :   Node doc = Load(ex7_21);</span>
<span class="lineNum">     900 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc.size());</span>
<span class="lineNum">     901 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[0].size());</span>
<span class="lineNum">     902 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[0][0].size());</span>
<span class="lineNum">     903 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;separate&quot;, doc[0][0][&quot;YAML&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     904 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[1].size());</span>
<span class="lineNum">     905 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[1][0].size());</span>
<span class="lineNum">     906 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;empty key entry&quot;, doc[1][0][Null].as&lt;std::string&gt;());</span>
<span class="lineNum">     907 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[2].size());</span>
<span class="lineNum">     908 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[2][0].size());</span>
<span class="lineNum">     909 </span>            : 
<span class="lineNum">     910 </span><span class="lineNoCov">          0 :   std::map&lt;std::string, std::string&gt; key;</span>
<span class="lineNum">     911 </span><span class="lineNoCov">          0 :   key[&quot;JSON&quot;] = &quot;like&quot;;</span>
<span class="lineNum">     912 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;adjacent&quot;, doc[2][0][key].as&lt;std::string&gt;());</span>
<a name="913"><span class="lineNum">     913 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     914 </span>            : 
<span class="lineNum">     915 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex7_22_InvalidImplicitKeys) {</span>
<span class="lineNum">     916 </span><span class="lineNoCov">          0 :   EXPECT_THROW_PARSER_EXCEPTION(Load(ex7_22), ErrorMsg::END_OF_SEQ_FLOW);</span>
<a name="917"><span class="lineNum">     917 </span>            : }</a>
<span class="lineNum">     918 </span>            : 
<span class="lineNum">     919 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex7_23_FlowContent) {</span>
<span class="lineNum">     920 </span><span class="lineNoCov">          0 :   Node doc = Load(ex7_23);</span>
<span class="lineNum">     921 </span><span class="lineNoCov">          0 :   EXPECT_EQ(5, doc.size());</span>
<span class="lineNum">     922 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[0].size());</span>
<span class="lineNum">     923 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;a&quot;, doc[0][0].as&lt;std::string&gt;());</span>
<span class="lineNum">     924 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;b&quot;, doc[0][1].as&lt;std::string&gt;());</span>
<span class="lineNum">     925 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[1].size());</span>
<span class="lineNum">     926 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;b&quot;, doc[1][&quot;a&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     927 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;a&quot;, doc[2].as&lt;std::string&gt;());</span>
<span class="lineNum">     928 </span><span class="lineNoCov">          0 :   EXPECT_EQ('b', doc[3].as&lt;char&gt;());</span>
<span class="lineNum">     929 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;c&quot;, doc[4].as&lt;std::string&gt;());</span>
<a name="930"><span class="lineNum">     930 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     931 </span>            : 
<span class="lineNum">     932 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex7_24_FlowNodes) {</span>
<span class="lineNum">     933 </span><span class="lineNoCov">          0 :   Node doc = Load(ex7_24);</span>
<span class="lineNum">     934 </span><span class="lineNoCov">          0 :   EXPECT_EQ(5, doc.size());</span>
<span class="lineNum">     935 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;tag:yaml.org,2002:str&quot;, doc[0].Tag());</span>
<span class="lineNum">     936 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;a&quot;, doc[0].as&lt;std::string&gt;());</span>
<span class="lineNum">     937 </span><span class="lineNoCov">          0 :   EXPECT_EQ('b', doc[1].as&lt;char&gt;());</span>
<span class="lineNum">     938 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;c&quot;, doc[2].as&lt;std::string&gt;());</span>
<span class="lineNum">     939 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;c&quot;, doc[3].as&lt;std::string&gt;());</span>
<span class="lineNum">     940 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;tag:yaml.org,2002:str&quot;, doc[4].Tag());</span>
<span class="lineNum">     941 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;&quot;, doc[4].as&lt;std::string&gt;());</span>
<a name="942"><span class="lineNum">     942 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     943 </span>            : 
<span class="lineNum">     944 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex8_1_BlockScalarHeader) {</span>
<span class="lineNum">     945 </span><span class="lineNoCov">          0 :   Node doc = Load(ex8_1);</span>
<span class="lineNum">     946 </span><span class="lineNoCov">          0 :   EXPECT_EQ(4, doc.size());</span>
<span class="lineNum">     947 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;literal\n&quot;, doc[0].as&lt;std::string&gt;());</span>
<span class="lineNum">     948 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot; folded\n&quot;, doc[1].as&lt;std::string&gt;());</span>
<span class="lineNum">     949 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;keep\n\n&quot;, doc[2].as&lt;std::string&gt;());</span>
<span class="lineNum">     950 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot; strip&quot;, doc[3].as&lt;std::string&gt;());</span>
<a name="951"><span class="lineNum">     951 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     952 </span>            : 
<span class="lineNum">     953 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex8_2_BlockIndentationHeader) {</span>
<span class="lineNum">     954 </span><span class="lineNoCov">          0 :   Node doc = Load(ex8_2);</span>
<span class="lineNum">     955 </span><span class="lineNoCov">          0 :   EXPECT_EQ(4, doc.size());</span>
<span class="lineNum">     956 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;detected\n&quot;, doc[0].as&lt;std::string&gt;());</span>
<span class="lineNum">     957 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;\n\n# detected\n&quot;, doc[1].as&lt;std::string&gt;());</span>
<span class="lineNum">     958 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot; explicit\n&quot;, doc[2].as&lt;std::string&gt;());</span>
<span class="lineNum">     959 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;\t\ndetected\n&quot;, doc[3].as&lt;std::string&gt;());</span>
<a name="960"><span class="lineNum">     960 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     961 </span>            : 
<span class="lineNum">     962 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex8_3a_InvalidBlockScalarIndentationIndicators) {</span>
<span class="lineNum">     963 </span><span class="lineNoCov">          0 :   EXPECT_THROW_PARSER_EXCEPTION(Load(ex8_3a), ErrorMsg::END_OF_SEQ);</span>
<a name="964"><span class="lineNum">     964 </span>            : }</a>
<span class="lineNum">     965 </span>            : 
<span class="lineNum">     966 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex8_3b_InvalidBlockScalarIndentationIndicators) {</span>
<span class="lineNum">     967 </span><span class="lineNoCov">          0 :   EXPECT_THROW_PARSER_EXCEPTION(Load(ex8_3b), ErrorMsg::END_OF_SEQ);</span>
<a name="968"><span class="lineNum">     968 </span>            : }</a>
<span class="lineNum">     969 </span>            : 
<span class="lineNum">     970 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex8_3c_InvalidBlockScalarIndentationIndicators) {</span>
<span class="lineNum">     971 </span><span class="lineNoCov">          0 :   EXPECT_THROW_PARSER_EXCEPTION(Load(ex8_3c), ErrorMsg::END_OF_SEQ);</span>
<a name="972"><span class="lineNum">     972 </span>            : }</a>
<span class="lineNum">     973 </span>            : 
<span class="lineNum">     974 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex8_4_ChompingFinalLineBreak) {</span>
<span class="lineNum">     975 </span><span class="lineNoCov">          0 :   Node doc = Load(ex8_4);</span>
<span class="lineNum">     976 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc.size());</span>
<span class="lineNum">     977 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;text&quot;, doc[&quot;strip&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     978 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;text\n&quot;, doc[&quot;clip&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     979 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;text\n&quot;, doc[&quot;keep&quot;].as&lt;std::string&gt;());</span>
<a name="980"><span class="lineNum">     980 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     981 </span>            : 
<span class="lineNum">     982 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, DISABLED_Ex8_5_ChompingTrailingLines) {</span>
<span class="lineNum">     983 </span><span class="lineNoCov">          0 :   Node doc = Load(ex8_5);</span>
<span class="lineNum">     984 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc.size());</span>
<span class="lineNum">     985 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;# text&quot;, doc[&quot;strip&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     986 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;# text\n&quot;, doc[&quot;clip&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     987 </span>            :   // NOTE: I believe this is a bug in the YAML spec -
<span class="lineNum">     988 </span>            :   // it should be &quot;# text\n\n&quot;
<span class="lineNum">     989 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;# text\n&quot;, doc[&quot;keep&quot;].as&lt;std::string&gt;());</span>
<a name="990"><span class="lineNum">     990 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     991 </span>            : 
<span class="lineNum">     992 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex8_6_EmptyScalarChomping) {</span>
<span class="lineNum">     993 </span><span class="lineNoCov">          0 :   Node doc = Load(ex8_6);</span>
<span class="lineNum">     994 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc.size());</span>
<span class="lineNum">     995 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;&quot;, doc[&quot;strip&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     996 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;&quot;, doc[&quot;clip&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     997 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;\n&quot;, doc[&quot;keep&quot;].as&lt;std::string&gt;());</span>
<a name="998"><span class="lineNum">     998 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     999 </span>            : 
<span class="lineNum">    1000 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex8_7_LiteralScalar) {</span>
<span class="lineNum">    1001 </span><span class="lineNoCov">          0 :   Node doc = Load(ex8_7);</span>
<span class="lineNum">    1002 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;literal\n\ttext\n&quot;, doc.as&lt;std::string&gt;());</span>
<a name="1003"><span class="lineNum">    1003 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">    1004 </span>            : 
<span class="lineNum">    1005 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex8_8_LiteralContent) {</span>
<span class="lineNum">    1006 </span><span class="lineNoCov">          0 :   Node doc = Load(ex8_8);</span>
<span class="lineNum">    1007 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;\n\nliteral\n \n\ntext\n&quot;, doc.as&lt;std::string&gt;());</span>
<a name="1008"><span class="lineNum">    1008 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">    1009 </span>            : 
<span class="lineNum">    1010 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex8_9_FoldedScalar) {</span>
<span class="lineNum">    1011 </span><span class="lineNoCov">          0 :   Node doc = Load(ex8_9);</span>
<span class="lineNum">    1012 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;folded text\n&quot;, doc.as&lt;std::string&gt;());</span>
<a name="1013"><span class="lineNum">    1013 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">    1014 </span>            : 
<span class="lineNum">    1015 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex8_10_FoldedLines) {</span>
<span class="lineNum">    1016 </span><span class="lineNoCov">          0 :   Node doc = Load(ex8_10);</span>
<span class="lineNum">    1017 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc.as&lt;std::string&gt;() ==</span>
<span class="lineNum">    1018 </span>            :               &quot;\nfolded line\nnext line\n  * bullet\n\n  * list\n  * &quot;
<span class="lineNum">    1019 </span><span class="lineNoCov">          0 :               &quot;lines\n\nlast line\n&quot;);</span>
<a name="1020"><span class="lineNum">    1020 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">    1021 </span>            : 
<span class="lineNum">    1022 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex8_11_MoreIndentedLines) {</span>
<span class="lineNum">    1023 </span><span class="lineNoCov">          0 :   Node doc = Load(ex8_11);</span>
<span class="lineNum">    1024 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc.as&lt;std::string&gt;() ==</span>
<span class="lineNum">    1025 </span>            :               &quot;\nfolded line\nnext line\n  * bullet\n\n  * list\n  * &quot;
<span class="lineNum">    1026 </span><span class="lineNoCov">          0 :               &quot;lines\n\nlast line\n&quot;);</span>
<a name="1027"><span class="lineNum">    1027 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">    1028 </span>            : 
<span class="lineNum">    1029 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex8_12_EmptySeparationLines) {</span>
<span class="lineNum">    1030 </span><span class="lineNoCov">          0 :   Node doc = Load(ex8_12);</span>
<span class="lineNum">    1031 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc.as&lt;std::string&gt;() ==</span>
<span class="lineNum">    1032 </span>            :               &quot;\nfolded line\nnext line\n  * bullet\n\n  * list\n  * &quot;
<span class="lineNum">    1033 </span><span class="lineNoCov">          0 :               &quot;lines\n\nlast line\n&quot;);</span>
<a name="1034"><span class="lineNum">    1034 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">    1035 </span>            : 
<span class="lineNum">    1036 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex8_13_FinalEmptyLines) {</span>
<span class="lineNum">    1037 </span><span class="lineNoCov">          0 :   Node doc = Load(ex8_13);</span>
<span class="lineNum">    1038 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc.as&lt;std::string&gt;() ==</span>
<span class="lineNum">    1039 </span>            :               &quot;\nfolded line\nnext line\n  * bullet\n\n  * list\n  * &quot;
<span class="lineNum">    1040 </span><span class="lineNoCov">          0 :               &quot;lines\n\nlast line\n&quot;);</span>
<a name="1041"><span class="lineNum">    1041 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">    1042 </span>            : 
<span class="lineNum">    1043 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex8_14_BlockSequence) {</span>
<span class="lineNum">    1044 </span><span class="lineNoCov">          0 :   Node doc = Load(ex8_14);</span>
<span class="lineNum">    1045 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc.size());</span>
<span class="lineNum">    1046 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[&quot;block sequence&quot;].size());</span>
<span class="lineNum">    1047 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;one&quot;, doc[&quot;block sequence&quot;][0].as&lt;std::string&gt;());</span>
<span class="lineNum">    1048 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[&quot;block sequence&quot;][1].size());</span>
<span class="lineNum">    1049 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;three&quot;, doc[&quot;block sequence&quot;][1][&quot;two&quot;].as&lt;std::string&gt;());</span>
<a name="1050"><span class="lineNum">    1050 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">    1051 </span>            : 
<span class="lineNum">    1052 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex8_15_BlockSequenceEntryTypes) {</span>
<span class="lineNum">    1053 </span><span class="lineNoCov">          0 :   Node doc = Load(ex8_15);</span>
<span class="lineNum">    1054 </span><span class="lineNoCov">          0 :   EXPECT_EQ(4, doc.size());</span>
<span class="lineNum">    1055 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[0].IsNull());</span>
<span class="lineNum">    1056 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;block node\n&quot;, doc[1].as&lt;std::string&gt;());</span>
<span class="lineNum">    1057 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[2].size());</span>
<span class="lineNum">    1058 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;one&quot;, doc[2][0].as&lt;std::string&gt;());</span>
<span class="lineNum">    1059 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;two&quot;, doc[2][1].as&lt;std::string&gt;());</span>
<span class="lineNum">    1060 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[3].size());</span>
<span class="lineNum">    1061 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;two&quot;, doc[3][&quot;one&quot;].as&lt;std::string&gt;());</span>
<a name="1062"><span class="lineNum">    1062 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">    1063 </span>            : 
<span class="lineNum">    1064 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex8_16_BlockMappings) {</span>
<span class="lineNum">    1065 </span><span class="lineNoCov">          0 :   Node doc = Load(ex8_16);</span>
<span class="lineNum">    1066 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc.size());</span>
<span class="lineNum">    1067 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[&quot;block mapping&quot;].size());</span>
<span class="lineNum">    1068 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;value&quot;, doc[&quot;block mapping&quot;][&quot;key&quot;].as&lt;std::string&gt;());</span>
<a name="1069"><span class="lineNum">    1069 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">    1070 </span>            : 
<span class="lineNum">    1071 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex8_17_ExplicitBlockMappingEntries) {</span>
<span class="lineNum">    1072 </span><span class="lineNoCov">          0 :   Node doc = Load(ex8_17);</span>
<span class="lineNum">    1073 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc.size());</span>
<span class="lineNum">    1074 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[&quot;explicit key&quot;].IsNull());</span>
<span class="lineNum">    1075 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[&quot;block key\n&quot;].size());</span>
<span class="lineNum">    1076 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;one&quot;, doc[&quot;block key\n&quot;][0].as&lt;std::string&gt;());</span>
<span class="lineNum">    1077 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;two&quot;, doc[&quot;block key\n&quot;][1].as&lt;std::string&gt;());</span>
<a name="1078"><span class="lineNum">    1078 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">    1079 </span>            : 
<span class="lineNum">    1080 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex8_18_ImplicitBlockMappingEntries) {</span>
<span class="lineNum">    1081 </span><span class="lineNoCov">          0 :   Node doc = Load(ex8_18);</span>
<span class="lineNum">    1082 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc.size());</span>
<span class="lineNum">    1083 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;in-line value&quot;, doc[&quot;plain key&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">    1084 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(doc[Null].IsNull());</span>
<span class="lineNum">    1085 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[&quot;quoted key&quot;].size());</span>
<span class="lineNum">    1086 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;entry&quot;, doc[&quot;quoted key&quot;][0].as&lt;std::string&gt;());</span>
<a name="1087"><span class="lineNum">    1087 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">    1088 </span>            : 
<span class="lineNum">    1089 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex8_19_CompactBlockMappings) {</span>
<span class="lineNum">    1090 </span><span class="lineNoCov">          0 :   Node doc = Load(ex8_19);</span>
<span class="lineNum">    1091 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc.size());</span>
<span class="lineNum">    1092 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[0].size());</span>
<span class="lineNum">    1093 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;yellow&quot;, doc[0][&quot;sun&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">    1094 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[1].size());</span>
<span class="lineNum">    1095 </span><span class="lineNoCov">          0 :   std::map&lt;std::string, std::string&gt; key;</span>
<span class="lineNum">    1096 </span><span class="lineNoCov">          0 :   key[&quot;earth&quot;] = &quot;blue&quot;;</span>
<span class="lineNum">    1097 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[1][key].size());</span>
<span class="lineNum">    1098 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;white&quot;, doc[1][key][&quot;moon&quot;].as&lt;std::string&gt;());</span>
<a name="1099"><span class="lineNum">    1099 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">    1100 </span>            : 
<span class="lineNum">    1101 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex8_20_BlockNodeTypes) {</span>
<span class="lineNum">    1102 </span><span class="lineNoCov">          0 :   Node doc = Load(ex8_20);</span>
<span class="lineNum">    1103 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, doc.size());</span>
<span class="lineNum">    1104 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;flow in block&quot;, doc[0].as&lt;std::string&gt;());</span>
<span class="lineNum">    1105 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Block scalar\n&quot;, doc[1].as&lt;std::string&gt;());</span>
<span class="lineNum">    1106 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[2].size());</span>
<span class="lineNum">    1107 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;bar&quot;, doc[2][&quot;foo&quot;].as&lt;std::string&gt;());</span>
<a name="1108"><span class="lineNum">    1108 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">    1109 </span>            : 
<span class="lineNum">    1110 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, DISABLED_Ex8_21_BlockScalarNodes) {</span>
<span class="lineNum">    1111 </span><span class="lineNoCov">          0 :   Node doc = Load(ex8_21);</span>
<span class="lineNum">    1112 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc.size());</span>
<span class="lineNum">    1113 </span>            :   // NOTE: I believe this is a bug in the YAML spec -
<span class="lineNum">    1114 </span>            :   // it should be &quot;value\n&quot;
<span class="lineNum">    1115 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;value&quot;, doc[&quot;literal&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">    1116 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;value&quot;, doc[&quot;folded&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">    1117 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;!foo&quot;, doc[&quot;folded&quot;].Tag());</span>
<a name="1118"><span class="lineNum">    1118 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">    1119 </span>            : 
<span class="lineNum">    1120 </span><span class="lineNoCov">          0 : TEST(NodeSpecTest, Ex8_22_BlockCollectionNodes) {</span>
<span class="lineNum">    1121 </span><span class="lineNoCov">          0 :   Node doc = Load(ex8_22);</span>
<span class="lineNum">    1122 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc.size());</span>
<span class="lineNum">    1123 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, doc[&quot;sequence&quot;].size());</span>
<span class="lineNum">    1124 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;entry&quot;, doc[&quot;sequence&quot;][0].as&lt;std::string&gt;());</span>
<span class="lineNum">    1125 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[&quot;sequence&quot;][1].size());</span>
<span class="lineNum">    1126 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;nested&quot;, doc[&quot;sequence&quot;][1][0].as&lt;std::string&gt;());</span>
<span class="lineNum">    1127 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, doc[&quot;mapping&quot;].size());</span>
<span class="lineNum">    1128 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;bar&quot;, doc[&quot;mapping&quot;][&quot;foo&quot;].as&lt;std::string&gt;());</span>
<a name="1129"><span class="lineNum">    1129 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">    1130 </span>            : }
<span class="lineNum">    1131 </span><span class="lineNoCov">          0 : }</span>
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
    <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.11</a></td></tr>
  </table>
  <br>

</body>
</html>
